//
//  ReviewTableViewCell.swift
//  CJXSwiftStoryboard
//
//  Created by CJX on 2016/11/15.
//  Copyright © 2016年 caijianxi. All rights reserved.
//

import UIKit

class ReviewTableViewCell: UITableViewCell {

    @IBOutlet weak var timeLabel: UILabel!
    @IBOutlet weak var nameLabel: UILabel!
    @IBOutlet weak var levelView: XHLevelView!
    @IBOutlet weak var wordsLabel: UILabel!
    
    
    var model : ReviewModel?{
        
        didSet{
            
            timeLabel.text = model?.date_added
            nameLabel.text = model?.customers_name
            wordsLabel.text = model?.reviews_text
            
            let starNumber = Float((model?.reviews_rating)!)
            

            levelView?.level = CGFloat(starNumber!)

            
            
        }
        
    }
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        


    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
